﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.ServiceModel;
using System.Xml.Linq;
using DevWeb.Biztalk.DeploymentSettings.Data.CodeFirst;
using DevWeb.Biztalk.DeploymentSettings.DeploymentService.Contracts.Extensions;
using DevWeb.Biztalk.DeploymentSettings.DeploymentService.Contracts.Faults;
using DevWeb.Biztalk.DeploymentSettings.DeploymentService.Contracts.Model;

namespace DevWeb.Biztalk.DeploymentSettings.DeploymentService.Contracts
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract(Namespace = "htpp://devweb.biztalk.deployment/IDeploymentSettingsService")]
    public interface IDeploymentSettingsService
    {
        //[OperationContract]
        //[ReferencePreservingDataContractFormat]
        //[FaultContract(typeof (ValidationFault))]
        //[FaultContract(typeof (SystemFault))]
        //[FaultContract(typeof (SecurityFault))]
        /////Get list of integrations; LazyLoading => False
        //IQueryable<Integration> GetIntegrations();

        //[OperationContract]
        //[ReferencePreservingDataContractFormat]
        /////Get all integrationdata , versions, verssettings and logdeployment;
        //Integration GetIntegrationData(Guid productupgradecode);

        //[OperationContract]
        //[ReferencePreservingDataContractFormat]
        /////Get all data of a specific Integration Version
        /////Integration-> 1 integrationversion -> alle the settings and logs 
        /////Not the Default Settings!!!
        //IntegrationVersion GetIntegrationVersionData(Guid productid);

        //[OperationContract]
        //[ReferencePreservingDataContractFormat]
        //[FaultContract(typeof (ValidationFault))]
        ////Get all Settings of an Integration Version including excluding Default Settings
        //IntegrationVersionSettings GetSettings(Guid productId);

        [OperationContract]
      //  [ReferencePreservingDataContractFormat]
        [FaultContract(typeof (ValidationFault))]
        //Get all Settings of an Integration Version including including Default Settings for a certain environment
        ExportModel GetEnvironmentSettings(Guid productupgradecode, Guid productid,
            string environment);

        //[OperationContract]
        //[FaultContract(typeof (ValidationFault))]
        ///// store ingegrationdata; 1 integration with at least 1 integrationversion
        //bool SaveIntegration(Integration integrationtosave);


        [OperationContract]
        [FaultContract(typeof(SystemFault))]
        bool LogDeployment(string machinename, string username, string deploymenttype, Guid productid,
            Guid productupgradecode, string environment);


       //[OperationContract(Name = "ImportIntegrationVersionDataByStream")]
       //[ReferencePreservingDataContractFormat]
       // [FaultContract(typeof (ValidationFault))]
       // [FaultContract(typeof (SystemFault))]
       // [FaultContract(typeof (SecurityFault))]
       // //Integration-> 1 integrationversion -> alle the settings and excluding logs 
       // Integration ImportIntegrationVersionData(XElement integrationdocument);

       // [OperationContract(Name = "ImportIntegrationVersionDataByObject")]
       // [ReferencePreservingDataContractFormat]
       // [FaultContract(typeof (ValidationFault))]
       // [FaultContract(typeof (SystemFault))]
       // [FaultContract(typeof (SecurityFault))]
       // Integration ImportIntegrationVersionData(IntegrationVersion integrationversiontoimport);

       // [OperationContract]
       // [ReferencePreservingDataContractFormat]
       // [FaultContract(typeof (ValidationFault))]
       // [FaultContract(typeof (SystemFault))]
       // [FaultContract(typeof (SecurityFault))]
       // //Integration-> 1 integrationversion -> alle the settings and excluding logs 
       // Integration ExportIntegrationVersionData(Guid productupgradecode, Guid productid);
    }
}